3.690 \(\int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^6 \, dx\)

Optimal. Leaf size=135 \[ \frac{a^3 c^6 (5 B+i A) (1-i \tan (e+f x))^8}{8 f}-\frac{4 a^3 c^6 (2 B+i A) (1-i \tan (e+f x))^7}{7 f}+\frac{2 a^3 c^6 (B+i A) (1-i \tan (e+f x))^6}{3 f}-\frac{a^3 B c^6 (1-i \tan (e+f x))^9}{9 f} \]

[Out]

(2*a^3*(I*A + B)*c^6*(1 - I*Tan[e + f*x])^6)/(3*f) - (4*a^3*(I*A + 2*B)*c^6*(1 - I*Tan[e + f*x])^7)/(7*f) + (a
^3*(I*A + 5*B)*c^6*(1 - I*Tan[e + f*x])^8)/(8*f) - (a^3*B*c^6*(1 - I*Tan[e + f*x])^9)/(9*f)

________________________________________________________________________________________

Rubi [A]  time = 0.202544, antiderivative size = 135, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.049, Rules used = {3588, 77} \[ \frac{a^3 c^6 (5 B+i A) (1-i \tan (e+f x))^8}{8 f}-\frac{4 a^3 c^6 (2 B+i A) (1-i \tan (e+f x))^7}{7 f}+\frac{2 a^3 c^6 (B+i A) (1-i \tan (e+f x))^6}{3 f}-\frac{a^3 B c^6 (1-i \tan (e+f x))^9}{9 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^6,x]

[Out]

(2*a^3*(I*A + B)*c^6*(1 - I*Tan[e + f*x])^6)/(3*f) - (4*a^3*(I*A + 2*B)*c^6*(1 - I*Tan[e + f*x])^7)/(7*f) + (a
^3*(I*A + 5*B)*c^6*(1 - I*Tan[e + f*x])^8)/(8*f) - (a^3*B*c^6*(1 - I*Tan[e + f*x])^9)/(9*f)

Rule 3588

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^6 \, dx &=\frac{(a c) \operatorname{Subst}\left (\int (a+i a x)^2 (A+B x) (c-i c x)^5 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int \left (4 a^2 (A-i B) (c-i c x)^5-\frac{4 a^2 (A-2 i B) (c-i c x)^6}{c}+\frac{a^2 (A-5 i B) (c-i c x)^7}{c^2}+\frac{i a^2 B (c-i c x)^8}{c^3}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{2 a^3 (i A+B) c^6 (1-i \tan (e+f x))^6}{3 f}-\frac{4 a^3 (i A+2 B) c^6 (1-i \tan (e+f x))^7}{7 f}+\frac{a^3 (i A+5 B) c^6 (1-i \tan (e+f x))^8}{8 f}-\frac{a^3 B c^6 (1-i \tan (e+f x))^9}{9 f}\\ \end{align*}

Mathematica [A]  time = 11.34, size = 262, normalized size = 1.94 \[ \frac{a^3 c^6 \sec (e) \sec ^9(e+f x) (63 (B-3 i A) \cos (2 e+f x)+63 (B-3 i A) \cos (f x)-189 A \sin (2 e+f x)+168 A \sin (2 e+3 f x)-84 A \sin (4 e+3 f x)+108 A \sin (4 e+5 f x)+27 A \sin (6 e+7 f x)+3 A \sin (8 e+9 f x)-84 i A \cos (2 e+3 f x)-84 i A \cos (4 e+3 f x)+189 A \sin (f x)-63 i B \sin (2 e+f x)-84 i B \sin (4 e+3 f x)+36 i B \sin (4 e+5 f x)+9 i B \sin (6 e+7 f x)+i B \sin (8 e+9 f x)+84 B \cos (2 e+3 f x)+84 B \cos (4 e+3 f x)+63 i B \sin (f x))}{1008 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^6,x]

[Out]

(a^3*c^6*Sec[e]*Sec[e + f*x]^9*(63*((-3*I)*A + B)*Cos[f*x] + 63*((-3*I)*A + B)*Cos[2*e + f*x] - (84*I)*A*Cos[2
*e + 3*f*x] + 84*B*Cos[2*e + 3*f*x] - (84*I)*A*Cos[4*e + 3*f*x] + 84*B*Cos[4*e + 3*f*x] + 189*A*Sin[f*x] + (63
*I)*B*Sin[f*x] - 189*A*Sin[2*e + f*x] - (63*I)*B*Sin[2*e + f*x] + 168*A*Sin[2*e + 3*f*x] - 84*A*Sin[4*e + 3*f*
x] - (84*I)*B*Sin[4*e + 3*f*x] + 108*A*Sin[4*e + 5*f*x] + (36*I)*B*Sin[4*e + 5*f*x] + 27*A*Sin[6*e + 7*f*x] +
(9*I)*B*Sin[6*e + 7*f*x] + 3*A*Sin[8*e + 9*f*x] + I*B*Sin[8*e + 9*f*x]))/(1008*f)

________________________________________________________________________________________

Maple [A]  time = 0.012, size = 193, normalized size = 1.4 \begin{align*}{\frac{{c}^{6}{a}^{3}}{f} \left ( -iB \left ( \tan \left ( fx+e \right ) \right ) ^{3}+{\frac{i}{8}}A \left ( \tan \left ( fx+e \right ) \right ) ^{8}-{\frac{5\,i}{4}}A \left ( \tan \left ( fx+e \right ) \right ) ^{4}-{\frac{3\,B \left ( \tan \left ( fx+e \right ) \right ) ^{8}}{8}}-{\frac{i}{6}}A \left ( \tan \left ( fx+e \right ) \right ) ^{6}-{\frac{3\,A \left ( \tan \left ( fx+e \right ) \right ) ^{7}}{7}}+{\frac{i}{9}}B \left ( \tan \left ( fx+e \right ) \right ) ^{9}-{\frac{5\,B \left ( \tan \left ( fx+e \right ) \right ) ^{6}}{6}}-{\frac{3\,i}{2}}A \left ( \tan \left ( fx+e \right ) \right ) ^{2}-A \left ( \tan \left ( fx+e \right ) \right ) ^{5}-iB \left ( \tan \left ( fx+e \right ) \right ) ^{5}-{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{4}}{4}}-{\frac{i}{7}}B \left ( \tan \left ( fx+e \right ) \right ) ^{7}-{\frac{A \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3}}+{\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{2}}+A\tan \left ( fx+e \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^6,x)

[Out]

1/f*c^6*a^3*(-I*B*tan(f*x+e)^3+1/8*I*A*tan(f*x+e)^8-5/4*I*A*tan(f*x+e)^4-3/8*B*tan(f*x+e)^8-1/6*I*A*tan(f*x+e)
^6-3/7*A*tan(f*x+e)^7+1/9*I*B*tan(f*x+e)^9-5/6*B*tan(f*x+e)^6-3/2*I*A*tan(f*x+e)^2-A*tan(f*x+e)^5-I*B*tan(f*x+
e)^5-1/4*B*tan(f*x+e)^4-1/7*I*B*tan(f*x+e)^7-1/3*A*tan(f*x+e)^3+1/2*B*tan(f*x+e)^2+A*tan(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.68577, size = 266, normalized size = 1.97 \begin{align*} \frac{280 i \, B a^{3} c^{6} \tan \left (f x + e\right )^{9} - 315 \,{\left (-i \, A + 3 \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{8} -{\left (1080 \, A + 360 i \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{7} - 420 \,{\left (i \, A + 5 \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{6} -{\left (2520 \, A + 2520 i \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{5} - 630 \,{\left (5 i \, A + B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{4} -{\left (840 \, A + 2520 i \, B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{3} - 1260 \,{\left (3 i \, A - B\right )} a^{3} c^{6} \tan \left (f x + e\right )^{2} + 2520 \, A a^{3} c^{6} \tan \left (f x + e\right )}{2520 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^6,x, algorithm="maxima")

[Out]

1/2520*(280*I*B*a^3*c^6*tan(f*x + e)^9 - 315*(-I*A + 3*B)*a^3*c^6*tan(f*x + e)^8 - (1080*A + 360*I*B)*a^3*c^6*
tan(f*x + e)^7 - 420*(I*A + 5*B)*a^3*c^6*tan(f*x + e)^6 - (2520*A + 2520*I*B)*a^3*c^6*tan(f*x + e)^5 - 630*(5*
I*A + B)*a^3*c^6*tan(f*x + e)^4 - (840*A + 2520*I*B)*a^3*c^6*tan(f*x + e)^3 - 1260*(3*I*A - B)*a^3*c^6*tan(f*x
 + e)^2 + 2520*A*a^3*c^6*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.2893, size = 586, normalized size = 4.34 \begin{align*} \frac{{\left (2688 i \, A + 2688 \, B\right )} a^{3} c^{6} e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (3456 i \, A - 1152 \, B\right )} a^{3} c^{6} e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (864 i \, A - 288 \, B\right )} a^{3} c^{6} e^{\left (2 i \, f x + 2 i \, e\right )} +{\left (96 i \, A - 32 \, B\right )} a^{3} c^{6}}{63 \,{\left (f e^{\left (18 i \, f x + 18 i \, e\right )} + 9 \, f e^{\left (16 i \, f x + 16 i \, e\right )} + 36 \, f e^{\left (14 i \, f x + 14 i \, e\right )} + 84 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 126 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 126 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 84 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 36 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 9 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^6,x, algorithm="fricas")

[Out]

1/63*((2688*I*A + 2688*B)*a^3*c^6*e^(6*I*f*x + 6*I*e) + (3456*I*A - 1152*B)*a^3*c^6*e^(4*I*f*x + 4*I*e) + (864
*I*A - 288*B)*a^3*c^6*e^(2*I*f*x + 2*I*e) + (96*I*A - 32*B)*a^3*c^6)/(f*e^(18*I*f*x + 18*I*e) + 9*f*e^(16*I*f*
x + 16*I*e) + 36*f*e^(14*I*f*x + 14*I*e) + 84*f*e^(12*I*f*x + 12*I*e) + 126*f*e^(10*I*f*x + 10*I*e) + 126*f*e^
(8*I*f*x + 8*I*e) + 84*f*e^(6*I*f*x + 6*I*e) + 36*f*e^(4*I*f*x + 4*I*e) + 9*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**6,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 2.64786, size = 344, normalized size = 2.55 \begin{align*} \frac{2688 i \, A a^{3} c^{6} e^{\left (6 i \, f x + 6 i \, e\right )} + 2688 \, B a^{3} c^{6} e^{\left (6 i \, f x + 6 i \, e\right )} + 3456 i \, A a^{3} c^{6} e^{\left (4 i \, f x + 4 i \, e\right )} - 1152 \, B a^{3} c^{6} e^{\left (4 i \, f x + 4 i \, e\right )} + 864 i \, A a^{3} c^{6} e^{\left (2 i \, f x + 2 i \, e\right )} - 288 \, B a^{3} c^{6} e^{\left (2 i \, f x + 2 i \, e\right )} + 96 i \, A a^{3} c^{6} - 32 \, B a^{3} c^{6}}{63 \,{\left (f e^{\left (18 i \, f x + 18 i \, e\right )} + 9 \, f e^{\left (16 i \, f x + 16 i \, e\right )} + 36 \, f e^{\left (14 i \, f x + 14 i \, e\right )} + 84 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 126 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 126 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 84 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 36 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 9 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^6,x, algorithm="giac")

[Out]

1/63*(2688*I*A*a^3*c^6*e^(6*I*f*x + 6*I*e) + 2688*B*a^3*c^6*e^(6*I*f*x + 6*I*e) + 3456*I*A*a^3*c^6*e^(4*I*f*x
+ 4*I*e) - 1152*B*a^3*c^6*e^(4*I*f*x + 4*I*e) + 864*I*A*a^3*c^6*e^(2*I*f*x + 2*I*e) - 288*B*a^3*c^6*e^(2*I*f*x
 + 2*I*e) + 96*I*A*a^3*c^6 - 32*B*a^3*c^6)/(f*e^(18*I*f*x + 18*I*e) + 9*f*e^(16*I*f*x + 16*I*e) + 36*f*e^(14*I
*f*x + 14*I*e) + 84*f*e^(12*I*f*x + 12*I*e) + 126*f*e^(10*I*f*x + 10*I*e) + 126*f*e^(8*I*f*x + 8*I*e) + 84*f*e
^(6*I*f*x + 6*I*e) + 36*f*e^(4*I*f*x + 4*I*e) + 9*f*e^(2*I*f*x + 2*I*e) + f)